package com.wkk.entity;

public class Course {
    private Integer cid;//课程编号
    private String cname;//课程名称
    private String sample;//课程样图
    private String mold;//课程类型
    private String teacher;//上课教师
    private Integer week;//周几
    private String schooltime;//上课时间
    private String venue;//上课地点
    private Integer price;//课程价格
    private Integer searchCount;//点击次数
    private Integer orderCount;//预约次数
    private Integer achieveMan;//用于实现完成后签退

    private Integer searchRanking;//点击量排名
    private Integer orderRanking;//预约量排名

    private Integer priceStart;//价格左区间
    private Integer priceEnd;//价格右区间

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getSample() {
        return sample;
    }

    public void setSample(String sample) {
        this.sample = sample;
    }

    public String getMold() {
        return mold;
    }

    public void setMold(String mold) {
        this.mold = mold;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public Integer getWeek() {
        return week;
    }

    public void setWeek(Integer week) {
        this.week = week;
    }

    public String getSchooltime() {
        return schooltime;
    }

    public void setSchooltime(String schooltime) {
        this.schooltime = schooltime;
    }

    public String getVenue() {
        return venue;
    }

    public void setVenue(String venue) {
        this.venue = venue;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getSearchCount() {
        return searchCount;
    }

    public void setSearchCount(Integer searchCount) {
        this.searchCount = searchCount;
    }

    public Integer getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    public Integer getSearchRanking() {
        return searchRanking;
    }

    public void setSearchRanking(Integer searchRanking) {
        this.searchRanking = searchRanking;
    }

    public Integer getOrderRanking() {
        return orderRanking;
    }

    public void setOrderRanking(Integer orderRanking) {
        this.orderRanking = orderRanking;
    }

    public Integer getAchieveMan() {
        return achieveMan;
    }

    public void setAchieveMan(Integer achieveMan) {
        this.achieveMan = achieveMan;
    }


    public Integer getPriceStart() {
        return priceStart;
    }

    public void setPriceStart(Integer priceStart) {
        this.priceStart = priceStart;
    }

    public Integer getPriceEnd() {
        return priceEnd;
    }

    public void setPriceEnd(Integer priceEnd) {
        this.priceEnd = priceEnd;
    }

    @Override
    public String toString() {
        return "Course{" +
                "cid=" + cid +
                ", cname='" + cname + '\'' +
                ", sample='" + sample + '\'' +
                ", mold='" + mold + '\'' +
                ", teacher='" + teacher + '\'' +
                ", schooltime='" + schooltime + '\'' +
                ", venue='" + venue + '\'' +
                ", price='" + price + '\'' +
                ", searchCount=" + searchCount +
                ", orderCount=" + orderCount +
                ", searchRanking=" + searchRanking +
                ", orderRanking=" + orderRanking +
                '}';
    }
    //重写hashCode和equals实现：同一个id等于同一个用户
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + cid;
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Course other = (Course) obj;
        if (cid != other.cid)
            return false;
        return true;
    }

}
